-- GENERATED SPELL FOR [Nightmare Phantasm] --


function spell0_15629(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(17228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15629', 625, 1)
end

function spell1_15629(pUnit, Event) --@Swell of Souls,n/a--
pUnit:FullCastSpellOnTarget(21307,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15629', 545, 1)
end

function Sorts_15629(pUnit, Event)
local choix_sorts_15629 = math.random(0, 1)
if choix_sorts_15629 == 0 then
pUnit:RegisterEvent('spell0_15629', 1, 1)
end
if choix_sorts_15629 == 1 then
pUnit:RegisterEvent('spell1_15629', 1, 1)
end
end

function mob15629_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15629', math.random(1500, 3000), 1)
end

function mob15629_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15629_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15629_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15629, 1, 'mob15629_Action')
RegisterUnitEvent(15629, 2, 'mob15629_Leave')
RegisterUnitEvent(15629, 3, 'mob15629_Kill')
RegisterUnitEvent(15629, 4, 'mob15629_Die')
